package com.imu.wys.quartz;

import com.imu.wys.mapper.UserStatisticsMapper;
import com.imu.wys.model.UserStatistics;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;

public class TaskStatistics  extends QuartzJobBean {

    @Autowired
    UserStatisticsMapper userStatisticsMapper;

    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        int t = userStatisticsMapper.insertStatistics();
        System.out.println("统计完成，共"+t+"条信息");
    }
}
